package com.qen.sheji.daili;

import cn.hutool.core.lang.Console;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class ProvyHandler implements InvocationHandler {

    private Object obj;

    public ProvyHandler(Object obj) {
        this.obj = obj;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        Console.log("ProvyHandler  before");
        method.invoke(obj, args);
        Console.log("ProvyHandler After");

        return null;
    }
}
